package com.carleasoft.mps.adu.business.role.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.carleasoft.mps.adu.business.role.bean.entity.AuthorityRoleEntity;
import com.carleasoft.mps.adu.business.role.bean.po.RoleParamsPo;
import com.carleasoft.mps.adu.business.role.bean.vo.AuthorityRoleVo;

import java.util.Map;

public interface GrantPermsService extends IService<AuthorityRoleEntity> {

    /**
     * 角色详情查询
     * @param roleCode
     * @return AuthorityRoleVo
     */
    AuthorityRoleVo getRoleByRoleCode(String roleCode);

    /**
     * 权限配置时查询登录用户所有能赋予的权限目标对象的权限和目标对象的权限
     * ok
     * @param
     */
    Map<String,AuthorityRoleVo> getTargetAndLoginUserRoles(RoleParamsPo roleParamsPo);


    /**
     * 查询目标对象所拥有的权限详情
     * ok
     * @param
     * @return ResultBody
     */
    AuthorityRoleVo getAllRolesByTargetCode (RoleParamsPo roleParamsPo);

    /**
     * 查询登录用户能使用的权限
     * ok
     * @param
     * @return ResultBody
     */
    AuthorityRoleVo  getAllPermsByUser(Boolean isInc,Boolean isTree);
}
